The DOORS manual says that the -cli (or -C) command line swith can be used to run a DXL script during DOORS startup, prior to the splash screen. I have done some experimenting, and it appears there are quite a few limitiations to this, and so I am just curious what, if anything, can be accomplished with this. |
Re: Can you do anything useful with the -cli command line switch? Peter |
Re: Can you do anything useful with the -cli command line switch? |
Re: Can you do anything useful with the -cli command line switch? Peter_Albert - Thu Feb 04 03:40:13 EST 2010 |
Re: Can you do anything useful with the -cli command line switch? SystemAdmin - Tue Jun 22 13:42:31 EDT 2010 Well, it is not really a limitation, but rather a fork pointing different users' "addins" and "ProjectAddins" to different locations on the network. As a prerequisite, you must have different copies of your DXL folders at different locations, say at "Z:\DOORS\dxl\allUsers" and "Z:\DOORS\dxl\Admin". Assuming both have sub-folders "addins" and "projectAddins", then you can use
bool isAdmin
isAdmin = yourRoutineForSpecifyingWhoHasAdminRights(username())
if (isAdmin)
{
setenv("addins", "Z:\\DOORS\\dxl\\Admin\\addins")
setenv("ProjectAddins", "Z:\\DOORS\\dxl\\Admin\\projectAddins")
}
else
{
setenv("addins", "Z:\\DOORS\\dxl\\allUsers\\addins")
setenv("ProjectAddins", "Z:\\DOORS\\dxl\\allUsers\\projectAddins")
}
in a file you call with "-cli". (You could of course also use the -a and -J command line switches directly, but with the above approach it is easier to grant and remove "admin routines" to users when necessary). |
Re: Can you do anything useful with the -cli command line switch? Peter_Albert - Wed Jun 23 03:55:24 EDT 2010 Well, it is not really a limitation, but rather a fork pointing different users' "addins" and "ProjectAddins" to different locations on the network. As a prerequisite, you must have different copies of your DXL folders at different locations, say at "Z:\DOORS\dxl\allUsers" and "Z:\DOORS\dxl\Admin". Assuming both have sub-folders "addins" and "projectAddins", then you can use
bool isAdmin
isAdmin = yourRoutineForSpecifyingWhoHasAdminRights(username())
if (isAdmin)
{
setenv("addins", "Z:\\DOORS\\dxl\\Admin\\addins")
setenv("ProjectAddins", "Z:\\DOORS\\dxl\\Admin\\projectAddins")
}
else
{
setenv("addins", "Z:\\DOORS\\dxl\\allUsers\\addins")
setenv("ProjectAddins", "Z:\\DOORS\\dxl\\allUsers\\projectAddins")
}
in a file you call with "-cli". (You could of course also use the -a and -J command line switches directly, but with the above approach it is easier to grant and remove "admin routines" to users when necessary). |
Re: Can you do anything useful with the -cli command line switch? Peter_Albert - Wed Jun 23 03:55:24 EDT 2010 Well, it is not really a limitation, but rather a fork pointing different users' "addins" and "ProjectAddins" to different locations on the network. As a prerequisite, you must have different copies of your DXL folders at different locations, say at "Z:\DOORS\dxl\allUsers" and "Z:\DOORS\dxl\Admin". Assuming both have sub-folders "addins" and "projectAddins", then you can use
bool isAdmin
isAdmin = yourRoutineForSpecifyingWhoHasAdminRights(username())
if (isAdmin)
{
setenv("addins", "Z:\\DOORS\\dxl\\Admin\\addins")
setenv("ProjectAddins", "Z:\\DOORS\\dxl\\Admin\\projectAddins")
}
else
{
setenv("addins", "Z:\\DOORS\\dxl\\allUsers\\addins")
setenv("ProjectAddins", "Z:\\DOORS\\dxl\\allUsers\\projectAddins")
}
in a file you call with "-cli". (You could of course also use the -a and -J command line switches directly, but with the above approach it is easier to grant and remove "admin routines" to users when necessary). It appears -cli code runs before the login screen so you cannot query on 'doorsName' but yes can query on 'username', which is the login user on the computer. I notice the 'setenv' actually change the environment variables in the Registry, wish it didn't do that. I wonder if the -cli code that sets the addins could coordinate with a -dxl code that sets them back. Mmmmmmmm ... -cli copies the entries in question using the 'registry' commands; perhaps creating key value "addins_Original". Then sets it. -dxl looks for 'addins_Original' and if there, copies it to 'addins' and deletes it. Perhaps I could ask them what Project they intend to do today, limiting the number of menus available to them
|